//Defining a class RageFaces
Osp.Core.Class.define("RageFaces",
{
	extend : Osp.Core.Object,
	
	members :
	{
		form : null,
		button : null,
		messageBox : null,
		
		//This method is called from index.html
		launch : function()
		{
			this.form = new Osp.Ui.Controls.Form({ style : Osp.Ui.Controls.FormStyle.INDICATOR | Osp.Ui.Controls.FormStyle.FOOTER });
			Osp.Ui.Controls.Frame.getInstance().addControl(this.form);
			Osp.Ui.Controls.Frame.getInstance().setCurrentForm(this.form);
			
			this.messageBox  = new Osp.Ui.Controls.MessageBox(
			{
				title : "RageFaces : Message",
				message : "You clicked the button",
				style : Osp.Ui.Controls.MessageBoxStyle.OK
			});
			this.button = new Osp.Ui.Controls.Button({ text : 'Click Here!', bounds : { x : 100, y : 300, width : 300, height : 60}});
			this.button.addListener('actionPerform', function(e){ this.messageBox.showAndWait(); },this);
			this.form.addControl(this.button);
		}
	}
});